<template>
	<n-form-item :label="props.item.name">
		<input type="text" class="input" v-bind="$attrs" @blur="set" v-model="val">
	</n-form-item>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	const props = defineProps(['item', 'index'])
	const emit = defineEmits(['setState'])
	const val = ref('')
	val.value = props.item.count

	const set = () => {
		emit('setState', props.index, val.value)
	}
</script>

<style scoped>
</style>
